within MediaDevel.Common;

package Types "Library of media property models"
//  extends Modelica.Icons.Library; // Bug in MathModelica & OpenModelica
//  extends Icons.Basic.Types;
    import SI = Modelica.SIunits;

  type Mass= SI.Mass;
  type Leng= SI.Length;
  type Area= SI.Area;
  type Vol= SI.Volume;
  type Height= SI.Height;
  type Depth= SI.Height;
  type Acceleration= SI.Acceleration;
  type TempC= SI.Temp_C;
  type TempK= SI.Temperature;
  type Pressure = AbsolutePressure;
  type PreskPa= Real(final quantity="Pressure", final unit="kPa", displayUnit="kPa");
  type Presbar= Real(final quantity="Pressure", final unit="bar", displayUnit="bar");
  type Heat= SI.Heat;
  type HeatFlow= Real(final quantity="Power", final unit="kW", displayUnit="kW");
  type HeatCapacity= Real(final quantity="HeatCapacity", final unit="J/degC", displayUnit="kJ/degC");
  type ThermalConductance= SI.ThermalConductance(displayUnit="kW/degC");
  type Energy= SI.Energy(displayUnit="kJ");
  type energy= SI.SpecificEnergy(displayUnit="kJ/kg");
  type intEnergy= energy;
  type IntEnergy= Energy;
  type enthalpy= energy;
  type Enthalpy= Energy;
  type Color= Integer[3];

  type PlatformType = enumeration(
          OpenModelica,
          JModelica,
          Dymola,
          MathModelica,
          SimulationX "SimulationX",
          MapleSim ) "Enumeration defining the Modelica Simulation S/W";
  type Accuracy = enumeration(
          Simple,
          Ideal,
          Practical,
          Strict "very accurate a.s.a.p ")
  "Enumeration defining the accuracy of calculation of a medium";

    type MolarHeatCapacity = Real(
        final quantity="MolarHeatCapacity",
        final unit="J/(kmol.K)",
        final displayUnit="kJ/(kmol.K)",
        min=0,
        max=1.e6,
        nominal=1.e3,
        start=1.e3);
    type MolarWeight = Real(
        final quantity="MolarMass",
        final unit="kg/kmol",
        min=0,
        max=1.e6,
        nominal=28.97);
    type SpecificVolume = SI.SpecificVolume(
        min=0,
        max=1.e5,
        nominal=1,
        start=1) "Type for density with medium specific attributes";

    type AbsolutePressure = SI.AbsolutePressure (
        displayUnit="Pa",
        min=0,
        max=1.e8,
        nominal=101325,
        start=101325)
      "Type for absolute pressure with medium specific attributes";
    type Density = SI.Density (
        displayUnit="kg/m3",
        min=0,
        max=1.e5,
        nominal=1,
        start=1) "Type for density with medium specific attributes";
    type DynamicViscosity = SI.DynamicViscosity (
        min=0,
        max=1.e8,
        nominal=1.e-3,
        start=1.e-3)
      "Type for dynamic viscosity with medium specific attributes";
    type EnthalpyFlowRate = SI.EnthalpyFlowRate (
        nominal=1000.0,
        min=-1.0e8,
        max=1.e8) "Type for enthalpy flow rate with medium specific attributes";

    type MassFraction = Real (
        quantity="MassFraction",
        final unit="kg/kg",
        min=0,
        max=1,
        nominal=0.1) "Type for mass fraction with medium specific attributes";
    type MoleFraction = Real (
        quantity="MoleFraction",
        final unit="mol/mol",
        min=0,
        max=1,
        nominal=0.1) "Type for mole fraction with medium specific attributes";
    type MolarMass = SI.MolarMass (
        min=0.001,
        max=0.25,
        nominal=0.032) "Type for molar mass with medium specific attributes";
    type MolarVolume = SI.MolarVolume (
        min=1e-6,
        max=1.0e6,
        nominal=1.0) "Type for molar volume with medium specific attributes";
    type IsentropicExponent = SI.RatioOfSpecificHeatCapacities (
        min=1,
        max=500000,
        nominal=1.2,
        start=1.2)
      "Type for isentropic exponent with medium specific attributes";
    type SpecificEnergy = SI.SpecificEnergy (
        min=-1.0e8,
        max=1.e8,
        nominal=1.e6)
      "Type for specific energy with medium specific attributes";
    type SpecificInternalEnergy = SpecificEnergy
      "Type for specific internal energy with medium specific attributes";
    type SpecificEnthalpy = SI.SpecificEnthalpy (
        min=-1.0e8,
        max=1.e8,
        nominal=1.e6)
      "Type for specific enthalpy with medium specific attributes";
    type SpecificEntropy = SI.SpecificEntropy (
        min=-1.e6,
        max=1.e6,
        nominal=1.e3)
      "Type for specific entropy with medium specific attributes";
    type SpecificHeatCapacity = SI.SpecificHeatCapacity (
        displayUnit="kJ/(kg.K)" "unit=J/(kg.K)",
        min=0,
        max=1.e6,
        nominal=1.e3,
        start=1.e3)
      "Type for specific heat capacity with medium specific attributes";
    type SurfaceTension = SI.SurfaceTension
      "Type for surface tension with medium specific attributes";
    type Temperature = SI.ThermodynamicTemperature (
        displayUnit="K",
        min=1,
        max=1.e4,
        nominal=300,
        start=300) "Type for temperature with medium specific attributes";
    type ThermalConductivity = SI.ThermalConductivity (
        quantity="ThermalConductivity",
        displayunit="kW/(m.degC)" "unit=W/(m.degC)",
        min=0,
        max=500,
        nominal=1,
        start=1)
      "Type for thermal conductivity with medium specific attributes";
    type PrandtlNumber = SI.PrandtlNumber (
        min=1e-3,
        max=1e5,
        nominal=1.0) "Type for Prandtl number with medium specific attributes";
    type VelocityOfSound = SI.Velocity (
        min=0,
        max=1.e5,
        nominal=1000,
        start=1.e3)
      "Type for velocity of sound with medium specific attributes";
    type DipoleMoment = Real (
        min=0.0,
        max=2.0,
        unit="debye",
        quantity="ElectricDipoleMoment")
      "Type for dipole moment with medium specific attributes";
end Types;

